﻿using Newtonsoft.Json;

namespace AutomationCommand
{
    public class wb_waterfall_opt : BasiCommand
    {
        [JsonProperty("xpath")]
        public string XPath { get; set; }

        [JsonProperty("keyvalues")]
        public string KeyValues { get; set; }

        [JsonProperty("tag_attribute")]
        public string TagAttribute { get; set; }

        [JsonProperty("time")]
        public string Time { get; set; }

        [JsonProperty("logname")]
        public string LogName { get; set; }

        [JsonProperty("option")]
        public string Option { get; set; }

        [JsonProperty("turn")]
        public string Turn { get; set; }

        [JsonProperty("fileter")]
        public string Fileter { get; set; }

        public wb_waterfall_opt()
        {
            FunctionType = "wb_waterfall_opt";
            OtherName = "瀑布流操作";
            XPath = "";
            KeyValues = "";
            TagAttribute = "";
            Time = "";
            LogName = "";
            Option = "";
            Turn = "y";
            Fileter = "";
            SuccessJump = -1;
            FailureJump = -1;
        }

        public bool Execute()
        {
            // 在这里编写执行命令的逻辑
            // 返回执行结果
            return true; // 假设此处始终成功
        }
    }
}
